import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import {MainComponent} from "./main.component";
import {WelcomeComponent} from "../../component/welcome/welcome.component";
import {UserComponent} from "../../component/user/user.component";
import {DictComponent} from "../../component/dict/dict.component";
import {ShopComponent} from "../../component/shop/shop.component";
import {HomeComponent} from "../../component/home/home.component";

const routes: Routes = [
  {
    path:'',
    component:MainComponent,
    children:[
      {
        path: '',
        component:HomeComponent,
      },
      {
        path: 'order',
        component:WelcomeComponent,
      },
      {
        path: 'config',
        component:DictComponent
      },
      {
        path: 'user',
        component:UserComponent
      },{
        path: 'shop',
        component:ShopComponent
      }
    ]
  }
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class MainRoutingModule { }
